using JH;
using UnityEngine;

public interface ITestService
{
}

public class A : IInjectable
{
    public string TestName = "A";

    public A(TestInjectableService service)
    {
        Debug.Log("这里注入了一个TestInjectableService对象" + service.name, service);
    }
}

public class B : IInjectable
{
    public string TestName = "B";

    public B(A a)
    {
        Debug.Log("传入了一个A对象" + a.GetHashCode());
    }
}

public class TestInjectableService : MonoBehaviour, IInjectable, ITestService
{
}